//
// Created by guanyicheng on 2021/11/8.
//

#include <iostream>

using namespace std;

int main() {
    int input, res = 0;
    cin >> input;
    while (input > 0) {
        if (input % 2) {
            ++res;
        }
        input = input / 2 ;
    }
    cout << res << endl;
}